/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.distribution.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yami.shop.bean.vo.UserVO;
import com.yami.shop.distribution.common.vo.DistributionUserVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
/**
 * @author yami
 */
@Data
@TableName( "tz_distribution_user_bind")
public class DistributionUserBind implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId
    @ApiModelProperty("用户关系表id")
    private Long bindId;

    @ApiModelProperty("分销员id")
    private Long distributionUserId;

    @ApiModelProperty("店铺id")
    private Long shopId;

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("当前绑定关系（-1失效 0 预绑定 1生效）")
    private Integer state;

    @ApiModelProperty("失效原因(0 超过有效期 1 管理员更改 3.暂时封禁)")
    private Integer invalidReason;

    @ApiModelProperty("变动时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("绑定时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date bindTime;

    @ApiModelProperty("失效时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date invalidTime;

    @ApiModelProperty("关联用户")
    @TableField(exist = false)
    private UserVO user;

    @ApiModelProperty("关联分销员")
    @TableField(exist = false)
    private DistributionUserVO distributionUser;
}
